home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / objects-x.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-11  |  2.7 KB  |  90 lines

  1. /* X-specific Lisp objects.
  2.    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  3.    Copyright (C) 1995 Board of Trustees, University of Illinois
  4.    Copyright (C) 1995 Ben Wing
  5.  
  6. This file is part of XEmacs.
  7.  
  8. XEmacs is free software; you can redistribute it and/or modify it
  9. under the terms of the GNU General Public License as published by the
  10. Free Software Foundation; either version 2, or (at your option) any
  11. later version.
  12.  
  13. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  14. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16. for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with XEmacs; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. /* Synched up with:  Not in FSF. */
  23.  
  24. #ifndef _XEMACS_OBJECTS_X_H_
  25. #define _XEMACS_OBJECTS_X_H_
  26.  
  27. #include "objects.h"
  28.  
  29. #ifdef HAVE_X_WINDOWS
  30.  
  31. /*****************************************************************************
  32.  Color-Instance
  33.  ****************************************************************************/
  34.  
  35. struct x_color_instance_data
  36. {
  37.   XColor color;
  38. };
  39.  
  40. #define X_COLOR_INSTANCE_DATA(c) ((struct x_color_instance_data *) (c)->data)
  41. #define COLOR_INSTANCE_X_COLOR(c) (X_COLOR_INSTANCE_DATA (c)->color)
  42.  
  43. int allocate_nearest_color (Display *display, Colormap screen_colormap,
  44.                 XColor *color_def);
  45.  
  46. /*****************************************************************************
  47.  Font-Instance
  48.  ****************************************************************************/
  49.  
  50. struct x_font_instance_data
  51. {
  52.   /* X-specific information */
  53.   Lisp_Object truename;
  54. #ifdef MULE
  55.   XFontSet font;
  56. #else
  57.   XFontStruct *font;
  58. #endif
  59. };
  60.  
  61. #define X_FONT_INSTANCE_DATA(f) ((struct x_font_instance_data *) (f)->data)
  62. #define FONT_INSTANCE_X_FONT(f) (X_FONT_INSTANCE_DATA (f)->font)
  63. #define FONT_INSTANCE_X_TRUENAME(f) (X_FONT_INSTANCE_DATA (f)->truename)
  64.  
  65. #ifdef EPOCH
  66.  
  67. /*****************************************************************************
  68.  Lisp_X_Resource
  69.  ****************************************************************************/
  70.  
  71. DECLARE_LRECORD (x_resource, struct Lisp_X_Resource);
  72. #define XX_RESOURCE(x) XRECORD (x, x_resource, struct Lisp_X_Resource)
  73. #define XSETX_RESOURCE(x, p) XSETRECORD (x, p, x_resource)
  74. #define X_RESOURCEP(x) RECORDP (x, x_resource)
  75. #define CHECK_X_RESOURCE(x, i) CHECK_RECORD (x, x_resource)
  76.  
  77. struct Lisp_X_Resource
  78. {
  79.   struct lcrecord_header header;
  80.  
  81.   XID xid;
  82.   Atom type;
  83. /*  Display *dpy; */    /* #### We can't run on multiple displays yet. */
  84. };
  85.  
  86. #endif /* EPOCH */
  87.  
  88. #endif /* HAVE_X_WINDOWS */
  89. #endif /* _XEMACS_OBJECTS_X_H_ */
  90.